{extend name="default/base/base_home" /} {block name="mall_main"}
<link rel="stylesheet" href="{$Think.HOME_SITE_ROOT}/css/index.css">
<link rel="stylesheet" href="{$Think.HOME_SITE_ROOT}/css/swiper.css">
<div class="clear"></div>
<!-- HomeFocusLayout Begin-->
<div class="home-focus-layout">
	<div class="bd">
		<ul>
			{dstaglib:adv ap_id='1' limit='10' item='v'}
			<li>
				<img src="{$v.img_url}" style="width: 100%;height: 100%;" />
				<a href="{$v.adv_link}" target="{$v.adv_target}" title="{$v.adv_title}">&nbsp;</a>
			</li>
			{/dstaglib:adv}
		</ul>
	</div>
	<div class="hd">
		<ul>
			{dstaglib:adv ap_id='1' limit='10' item='v'}
			<li class=""></li>
			{/dstaglib:adv}
		</ul>
	</div>
</div>
<!--商城四大优势-->
<ul class="advantage w1200 mt20">
	<li>
		<a target="_blank" title="">
			<img src="{$Think.UPLOAD_SITE_URL}/{$Think.ATTACH_COMMON}/cover_icon.png" />
		</a>
	</li>
	<li>
		<a target="_blank" title="">
			<img src="{$Think.UPLOAD_SITE_URL}/{$Think.ATTACH_COMMON}/accredit _cion.png" />
		</a>
	</li>
	<li>
		<a target="_blank" title="">
			<img src="{$Think.UPLOAD_SITE_URL}/{$Think.ATTACH_COMMON}/shipments_icon.png" />
		</a>
	</li>
	<li>
		<a target="_blank" title="">
			<img src="{$Think.UPLOAD_SITE_URL}/{$Think.ATTACH_COMMON}/service_icon.png" />
		</a>
	</li>
</ul>

<!--优选品牌-->
<div class="w1200 mt50">
	<h4 class="index_commin_title"><img src="{$Think.UPLOAD_SITE_URL}/{$Think.ATTACH_COMMON}/preferred_wine.png"/></h4>
	<div class="swiper-container mt20">
		<div class="swiper-wrapper">
			{notempty name="recommend_list"} {foreach name="recommend_list" item="goods"}
			<div class="swiper-slide">
				<a href="{:url('Goods/index',['goods_id'=>$goods.goods_id])}" target="_blank">
					<img src="{:goods_cthumb($goods.goods_image)}?x-oss-process=image/resize,m_lfit,h_400,w_304" />
					<div class="product__details mt20">
						<p>{$goods.goods_name}</p>
						<ul class="product-price mt10">
							<li>￥{$goods.goods_promotion_price}</li>
							<li class="old_price">￥{$goods.goods_price}</li>
						</ul>
					</div>
				</a>
			</div>
			{/foreach} {/notempty}
		</div>
		<!-- 如果需要导航按钮 -->
		<div class="swiper-button-prev"></div>
		<div class="swiper-button-next"></div>
		<!-- Add Pagination -->
		<!--<div class="swiper-pagination"></div>-->
	</div>
</div>
<!--优选品牌-->
<div class="w1200 mt50">
	<h4 class="index_commin_title"><img src="{$Think.UPLOAD_SITE_URL}/{$Think.ATTACH_COMMON}/optimizing_brand.png"/></h4>
	<div class="marketing mt50">
		<ul class="banner_small mt10">
			{dstaglib:adv ap_id='2' limit='5' item='v'}
			<li>
				<a href="{$v.adv_link}" target="_blank">
					<!--	如果检测到图片是阿里云oss	-->
					<?php if(strpos($v['adv_code'],'alioss_') !== false):?>
						<img src="<?php echo config('oss_img_path.admin_adv_img_path');?>{$v.adv_code}"/>
					<?php else:?>
						<img src="{$Think.UPLOAD_SITE_URL}/{$Think.ATTACH_ADV}/{$v.adv_code}"/>
					<?php endif;?>
				</a>
			</li>
			{/dstaglib:adv}
		</ul>
		<ul class="banner_big mt10">
			<?php $i = 1;?>
			{dstaglib:adv ap_id='2' limit='10' item='v'}
			<?php if($i >5 ):?>
			<li>
				<a href="{$v.adv_link}" target="_blank">
					<!--	如果检测到图片是阿里云oss	-->
					<?php if(strpos($v['adv_code'],'alioss_') !== false):?>
						<img src="<?php echo config('oss_img_path.admin_adv_img_path');?>{$v.adv_code}"/>
					<?php else:?>
						<img src="{$Think.UPLOAD_SITE_URL}/{$Think.ATTACH_ADV}/{$v.adv_code}"/>
					<?php endif;?>
				</a>
			</li>
			<?php endif;?>
			<?php $i += 1;?>
			{/dstaglib:adv}
		</ul>
	</div>
</div>
<!--精品好货-->
<div class="w1200 mt50 mb20">
	<h4 class="index_commin_title"><img src="{$Think.UPLOAD_SITE_URL}/{$Think.ATTACH_COMMON}/marketing_logo.png"/><a href="home/category/goods.html" target="_blank" class="boutique_more">查看更多》》</a></h4>
	<ul class="boutique clearfix">
		<!--	5个推荐	 -->
		{notempty name="recommend_list"} {foreach name="recommend_list" item="goods"}
		<li class="mt50">
			<a href="{:url('Goods/index',['goods_id'=>$goods.goods_id])}" target="_blank">
				<img class="lazyload boutique_logo" data-original="{:goods_cthumb($goods.goods_image)}" alt="{$goods.goods_name}"/>
			</a>
			<div class="boutique_details">
				<p>{$goods.goods_name}</p>
				<p class="boutique_price mt10"><span class="now_price">￥{$goods.goods_price}</span></p>
			</div>
		</li>
		{/foreach} {/notempty}
		<!--	5个限时折扣	 -->
		{notempty name="promotion_list"} {foreach name="promotion_list" item="goods"}
		<li class="mt50">
			<a href="{:url('Goods/index',['goods_id'=>$goods.goods_id])}" target="_blank">
				<img class="lazyload boutique_logo" data-original="{:goods_cthumb($goods.goods_image)}" alt="{$goods.goods_name}"/>
			</a>
			<div class="boutique_details">
				<p>{$goods.goods_name}</p>
				<p class="boutique_price mt10"><span class="now_price">￥{$goods.goods_price}</span></p>
			</div>
		</li>
		{/foreach} {/notempty}
	</ul>
</div>
<script src="{$Think.PLUGINS_SITE_ROOT}/jquery.SuperSlide.2.1.1.js"></script>
<script src="{$Think.PLUGINS_SITE_ROOT}/swiper.js"></script>
<script>
	//轮播
	jQuery(".home-focus-layout").slide({
		mainCell: ".bd ul",
		autoPlay: true,
		delayTime: 500,
		interTime: 3000
	});
	jQuery(".home-scroll").slide({
		mainCell: ".bd li",
		autoPage: true,
		autoPlay: true,
		delayTime: 1000,
		effect: "left",
		interTime: 3000,
		vis: 5
	});
	jQuery(".home-sale-layout").slide({
		autoPlay: false,
	});

	//优选品牌轮播
	var swiper = new Swiper('.swiper-container', {
		slidesPerView: 3,
		spaceBetween: 30,
		centeredSlides: true,
		autoplay: { //自动切换
			delay: 5000,
			stopOnLastSlide: false,
			disableOnInteraction: false,
		},
		loop: true,
		// 如果需要前进后退按钮
		navigation: {
			nextEl: '.swiper-button-next',
			prevEl: '.swiper-button-prev',
		},
	});
</script>
{/block}